package query_generator;

import java.io.BufferedWriter;
import java.io.FileWriter;

import config.Config;

// This generates a file with 100 instances of queries 1 to 22, so 2200 queries
public class QueryGeneratorMain {

	public static void main(String[] args) {
		try {
			String fileName = System.getProperty("user.home") + '/' + Config.generated_queries_file;
			FileWriter fstream = new FileWriter(fileName, false);
			BufferedWriter outFile = new BufferedWriter(fstream);
			
			for(int q=1; q<=22; q++) {
				for(int i=1; i<=Config.same_query_count; i++) {
					String query = QueryGenerator.Q(q);
					outFile.write(query);
					outFile.newLine();
					outFile.write('|');
				}
			}
			outFile.close();
		} catch (Exception e) {
			System.out.println("Can't write to experiments file!!!");
			e.printStackTrace();
		}

	}

}
